//
//  XMN_ReadTypeWithoutImageCell.m
//  B段项目
//
//  Created by dllo on 15/11/5.
//  Copyright © 2015年 谢美娜. All rights reserved.
//

#import "XMN_ReadTypeWithoutImageCell.h"

@implementation XMN_ReadTypeWithoutImageCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _titleLabel = [[myTitleLabel alloc]init];
        [self addSubview:_titleLabel];
        
        _contentLabel = [[myContectLabel alloc]init];
        _contentLabel.numberOfLines = 0;
        _contentLabel.textColor = [UIColor grayColor];
        [self addSubview:_contentLabel];
        
    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    _titleLabel.frame = CGRectMake(10 * FitWidth, 10 * FitHeight, ScreenWidth - 20 * FitWidth, 20 * FitHeight);
    _contentLabel.frame = CGRectMake(_titleLabel.frame.origin.x, _titleLabel.frame.origin.y + _titleLabel.frame.size.height + 10 * FitHeight, _titleLabel.frame.size.width, 70 * FitHeight);
}

-(void)setTypeList:(XMN_TypeList *)typeList{
    _titleLabel.text = typeList.title;
    _contentLabel.text = typeList.content;
}

-(void)setTypeWrite:(XMN_TypeWrite *)typeWrite{
    _titleLabel.text = typeWrite.title;
    _contentLabel.text = typeWrite.shortcontent;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
